package cn.dankal.flyaudio.friend.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

import cn.dankal.basiclib.base.recyclerview.BaseRecyclerViewAdapter;
import cn.dankal.basiclib.base.recyclerview.BaseRecyclerViewHolder;
import cn.dankal.basiclib.util.image.PicUtils;
import cn.dankal.flyaudio.R;
import cn.dankal.flyaudio.friend.utils.ImageLoadUtils;
import cn.jpush.im.android.api.model.Conversation;

public class ShareMemeberAdapter extends BaseRecyclerViewAdapter<Conversation> {
    @Override
    protected int getLayoutResId(int viewType) {
        return R.layout.item_share_memebers;
    }

    @Override
    protected BaseRecyclerViewHolder getViewHolder(ViewGroup parent, View rootView, int viewType) {
        return new ViewHolder(rootView);
    }

    public class ViewHolder extends BaseRecyclerViewHolder<Conversation>{

        public ViewHolder(View itemView) {
            super(itemView);
        }

        @Override
        public void onBindData(Conversation data, int position) {
            Glide.with(context).load(data.getAvatarFile()).placeholder(R.mipmap.ic_default_avatar).into((ImageView) itemView.findViewById(R.id.iv_avatar));
        }
    }
}
